/**
 * 
 */
package app.constants;

import java.awt.Color;
import java.awt.Toolkit;
import java.io.File;

import org.apache.commons.io.FilenameUtils;

import core.proto.Util;

import de.jaret.util.date.JaretDate;

public interface CollabVizConstants {
	public static final int DIVIDER_SIZE = 6;
	
	public static final int SECONDS_IN_A_DAY = 24 * 3600;
	
	public static final JaretDate TIMELINE_START_DATE = new JaretDate(1,1,2008,0,0,0);;
	public static final JaretDate TIMELINE_END_DATE = new JaretDate(31,12,2011,0,0,0);
	
	public static final String ENCODING = "UTF-8";
	
	public static final String NOTEPAD_HILITE_DATA_FILE = "notepadhilites.dat";
	public static final String HILITE_DATA_FILE = "hilites.dat";
	public static final String XML_CONFIG_FILE_ERROR = "";
	public static final String FILE_IO_ERROR = "";
	public static final String XML_MAPPING_FILE_ERROR = "";
	public static final String FILE_UNMARSHALL_ERROR = "";
	public static final String MARSHALL_ERROR = "";
	public static final String FILE_VALIDATION_ERROR = "";
	public static final String FILE_NOT_FOUND_ERROR = "";
	public static final String FILE_MARSHALL_INPUT_ERROR = "";
	public static final String MAPPING_FILE_ERROR = "";
	public static final String INCOMING_PARAM_EMPTY_ERROR = "";

	public static final String DEFAULT_WAYPOINT_PNG = "standard_waypoint.png";
	

	public static final String FILE_DELIMITER = "/";
	public static final String ANNOTATION_DELIMITER = "~"; 
	public static final String DOT_REGEX = "\\.";
	public static final String DOT_CHAR = ".";
	
	
	public static final String NO_DOC_OPEN_TAG = "NONE";
	public static final Color SEARCH_NOTE_COLOR = Color.LIGHT_GRAY;
	public static final int MAX_TAB_NAME_LENGTH = 15; 
	public static final int ANNOTATION_MARGIN = 200;
	
	public static final int ANNOTATION_POPUP_SIDE = 200;
	
	// Constants for where to put the split pane dividers. 
	// These are percentages with respect to the split pane size.
	// Alter these to adjust the divider placements. 
	public static final double VIZ_NOTES_SPLIT_RATIO = 0.5; // ratio of viz height to note height 
	public static final double FILE_TREE_SPLIT_RATIO = 0.25; // ratio of file tree width to doc width
	public static final double TOP_BOTTOM_SPLIT_RATIO = 0.70; // ratio of doc height to timeline height
	public static final double LEFT_RIGHT_SPLIT_RATIO = 0.6; // ratio of timeline width to map width
	public static final double VIZWORDLIST_RATIO = 0.11; // ratio of word list width to viz width 
	
	public static final double CHAT_HEIGHT_PERCENT = 0.4;
	public static final double CHAT_WIDTH_PERCENT = 0.25;
	
	// Our applet's size. 
	public static final int WINDOW_WIDTH = (int) Toolkit.getDefaultToolkit().getScreenSize().getWidth();
	public static final int WINDOW_HEIGHT = (int) Toolkit.getDefaultToolkit().getScreenSize().getHeight();
	
	public static final int SEARCH_BOX_WIDTH = 171;
	public static final int SEARCH_BOX_HEIGHT = 20;
	

	// For formatting a human-readable string for time. 
	public static final String DATE_FORMAT_NOW = "HH:mm:ss.SSS";
	
	public static final Color OPEN_FILE_NODE_COLOR = new Color(224, 236, 255);
	public static final Color OPEN_FILE_NODE_FOCUS_COLOR = new Color(195, 217, 255);
	
	public static final String COMMA = ",";
	
	// THese paths reside locally. 
	public static final String LOCAL_DIRECTORY = System.getProperty("user.home").replace("\\", "/") + "/Desktop/Collabviz/";
	public static final String HTML_FILES_FOLDER = FilenameUtils.concat(LOCAL_DIRECTORY, "HTML");
	public static final String INDEX_DIRECTORY = FilenameUtils.concat(LOCAL_DIRECTORY, "index");
	public static final String USER_LOG_FILE_NAME = "userlog";
	public static final String LOG_FOLDER = LOCAL_DIRECTORY+"Logs"; // For loading from config file. 
	public static final String NOTEPAD_HIGHLIGHT_FOLDER = FilenameUtils.concat(LOCAL_DIRECTORY, "NotePad_Highlights");
	public static final String ANNOTATIONS_FOLDER = FilenameUtils.concat(LOCAL_DIRECTORY, "Annotations");
	
	// These paths reside on the server. 
	public static final String DATA_DIRECTORY = "resources/data";
	public static final String DOC_WAYPOINTIMG_MAP_FILE = FilenameUtils.concat(DATA_DIRECTORY, "waypoint_image_map.txt");
	public static final String RADIAL_TREE_DATA_FILE = FilenameUtils.concat(DATA_DIRECTORY, "similarity.xml");
	public static final String IMG_FOLDER = "resources/img";
	public static final String DOC_SIZE_FILE = FilenameUtils.concat(DATA_DIRECTORY, "docsize.xml");
	
	public static final Color NOTE_COLOR = Color.getHSBColor(60, 20, 20);
	public static final Color FOREIGN_NOTE_COLOR = new Color(195, 217, 255);
}

